﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

#pragma warning disable CS8618
namespace OpenAiProxy.API.Models
{
    /// <summary>
    /// Windows设备信息表
    /// </summary>
    [Table("windows_info")]
    public class WindowsInfo
    {
        [Key]
        [Column("id", TypeName = "varchar(32)")]
        public string Id { get; set; }

        /// <summary>
        /// CPU Id
        /// </summary>
        [Column("cpu_id", TypeName = "varchar(128)")]
        public string CpuId { get; set; }

        /// <summary>
        /// 主板Id
        /// </summary>
        [Column("board_id", TypeName = "varchar(128)")]
        public string BoardId { get; set; }

        /// <summary>
        /// 硬盘Id
        /// </summary>
        [Column("disk_id", TypeName = "varchar(128)")]
        public string DiskId { get; set; }

        /// <summary>
        /// 操作系统
        /// </summary>
        [Column("os_version", TypeName = "varchar(50)")]
        public string OsVersion { get; set; }

        /// <summary>
        /// 计算机名称
        /// </summary>
        [Column("computer_name", TypeName = "varchar(50)")]
        public string ComputerName { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [Column("computer_user_name", TypeName = "varchar(50)")]
        public string ComputerUserName { get; set; }

        /// <summary>
        /// 是否64位操作系统(0-否，1-是，默认0)
        /// </summary>
        [Required]
        [Column("is_64bit_os", TypeName = "tinyint unsigned")]
        public byte Is64BitOs { get; set; }

        /// <summary>
        /// 处理器核心数
        /// </summary>
        [Required]
        [Column("processor_count", TypeName = "int unsigned")]
        public int ProcessorCount { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Required]
        [Column("create_time", TypeName = "datetime")]
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 上次活动时间
        /// </summary>
        [Required]
        [Column("last_activity_time", TypeName = "datetime")]
        public DateTime? LastActivityTime { get; set; }
    }
}
